/**
 * BIM资料管理
 */
import request from '@/utils/request'
import { kfApiUrl, appApiUrl, commonApiUrl, projectApiUrl } from '../config'

/**
 * @description 责任分包
 */
 export function getSubContractorList(params) {
  return request({
    url: `${kfApiUrl}/customerMaintenanceManager/getSubContractorList`,
    method: 'get',
    params
  })
}

/**
 * @description 维保借鉴
 */
 export function getMaintenanceInfo(params) {
  return request({
    url: `${kfApiUrl}/customerMaintenanceManager/getMaintenanceInfo`,
    method: 'get',
    params
  })
}
/**
 * @description 责任分包
 */
 export function cancelManager(params) {
  return request({
    url: `${kfApiUrl}/customerMaintenanceManager/cancel`,
    method: 'get',
    params
  })
}

/**
 * @description 获取编码
 */
 export function submitManager(data) {
  return request({
    url: `${kfApiUrl}/customerMaintenanceManager/submit`,
    method: 'post',
    data
  })
}
/**
 * @description 获取编码
 */
 export function updateByPrimaryKeySelective(data) {
  return request({
    url: `${kfApiUrl}/customerMaintenanceManager/updateByPrimaryKeySelective`,
    method: 'post',
    data
  })
}
/**
 * @description 获取编码
 */
 export function getPageCustomerComplaintInfo(data) {
  return request({
    url: `${kfApiUrl}/customerComplaintInfo/getPageCustomerComplaintInfo`,
    method: 'post',
    data
  })
}
/**
 * @description 获取编码
 */
 export function getAllBusinessCode(params) {
  return request({
    url: `${kfApiUrl}/customerComplaint/getAllBusinessCode`,
    method: 'get',
    params
  })
}
/**
 * @description 撤销
 */
 export function customerComplaintCancel(params) {
  return request({
    url: `${kfApiUrl}/customerComplaint/cancel`,
    method: 'get',
    params
  })
}
/**
 * @description 保存并提交
 */
 export function customerSubmit(data) {
  return request({
    url: `${kfApiUrl}/customerComplaint/submit`,
    method: 'post',
    data
  })
}
/**
 * @description 保存并提交
 */
 export function saveAndSubmit(data) {
  return request({
    url: `${kfApiUrl}/customerComplaint/saveAndSubmit`,
    method: 'post',
    data
  })
}
/**
 * @description 添加数据管理
 */
 export function getCustomerDataManagerById(params) {
  return request({
    url: `${kfApiUrl}/customerDataManager/getCustomerDataManagerById`,
    method: 'get',
    params
  })
}
/**
 * @description 添加数据管理
 */
 export function addCustomerDataManager(data) {
  return request({
    url: `${kfApiUrl}/customerDataManager/insertSelective`,
    method: 'post',
    data
  })
}
/**
 * @description 添加数据管理
 */
 export function editCustomerDataManager(data) {
  return request({
    url: `${kfApiUrl}/customerDataManager/updateByPrimaryKeySelective`,
    method: 'post',
    data
  })
}
/**
 * @description 数据管理
 */
 export function getCustomerList(data) {
  return request({
    url: `${kfApiUrl}/customerDataManager/queryCustomerDataManagerList`,
    method: 'post',
    data
  })
}


/**
 * @description 修改投诉事项信息
 */
 export function changeCustomerComplaint(data) {
  return request({
    url: `${kfApiUrl}/customerMaintenanceManager/updateByPrimaryKeySelective`,
    method: 'post',
    data
  })
}
/**
 * @description 查看投诉信息
 */
 export function getBusinessCode(params) {
  return request({
    url: `${kfApiUrl}/customerComplaint/getBusinessCode`,
    method: 'get',
    params
  })
}

/**
 * @description 查看投诉信息
 */
 export function getCustomerComplaintById(params) {
  return request({
    url: `${kfApiUrl}/customerMaintenanceManager/getCustomerMaintenanceManagerById`,
    method: 'get',
    params
  })
}


/**
 * @description 投诉事项信息
 */
 export function getComplaintTree(data) {
  return request({
    url: `${kfApiUrl}/customerComplaintInfo/queryCustomerComplaintInfoList`,
    method: 'post',
    data
  })
}
/**
 * @description 投诉类型信息
 */
 export function getComplaintType(params) {
  return request({
    url: `${kfApiUrl}/customerComplaint/getComplaintType`,
    method: 'get',
    params
  })
}
/**
 * @description 投诉人信息
 */
 export function getOwnerInfoList(params) {
  return request({
    url: `${kfApiUrl}/customerComplaint/getOwnerInfoList/${params}`,
    method: 'get'
  })
}
/**
 * @description 项目信息
 */
 export function getProjectInfo(params) {
  return request({
    url: `${kfApiUrl}/customerMaintenanceManager/getProjectInfo/${params}`,
    method: 'get'
  })
}
/**
 * @description 项目列表
 */
 export function getPCProjectList(data) {
  return request({
    url: `${kfApiUrl}/customerComplaint/getPCProjectList`,
    method: 'post',
    data
  })
}
/**
 * @description 投诉列表
 */
 export function addCustomerComplaint(data) {
  return request({
    url: `${kfApiUrl}/customerComplaint/insertSelective`,
    method: 'post',
    data
  })
}

/**
 * @description 投诉分类
 */
 export function queryComplaintTree(params) {
  return request({
    url: `${kfApiUrl}/customerComplaintTree/queryComplaintTree`,
    method: 'get',
    params
  })
}
/**
 * @description 投诉列表
 */
 export function exportComplaint(data) {
  return request({
    url: `${kfApiUrl}/customerComplaint/exportComplaint`,
    method: 'post',
    data
  })
}

/**
 * @description weibao列表
 */
 export function getComplaintList(data) {
  return request({
    url: `${kfApiUrl}/customerMaintenanceManager/getPageCustomerMaintenanceManager`,
    method: 'post',
    data
  })
}

/**
 * @description 获取整改人
 */
export function getProblemEmployees(params) {
  return request({
    url: `/ycloud-organization/employees/list-by`,
    method: 'get',
    params
  })
}

/**
 * @description 获取责任人
 */
export function getProblemNode(params) {
  return request({
    url: `${appApiUrl}/problem/getNodeStatusById`,
    method: 'get',
    params
  })
}

/**
 * @description 获取复查人
 */
export function getProblemEmp(params) {
  return request({
    url: `${appApiUrl}/problem/employees`,
    method: 'get',
    params
  })
}


/**
 * @description 问题具体位置
 */
 export function getNodeById(params) {
  return request({
    url: `${appApiUrl}/cscec-pms-app-business/problem/getNodeById`,
    method: 'get',
    params
  })
}
/**
 * @description 排查隐患
 */
export function getLabelTypesLeft(params) {
  return request({
    url: `${appApiUrl}/safety/getLabelTypesLeft/HIDDEN_DANGERS_LEFT`,
    method: 'get',
    params
  })
}

/**
 * @description 获取问题级别
 */
export function getProblem(data) {
  return request({
    url: `${appApiUrl}/problem/type`,
    method: 'post',
    data
  })
}

/**
 * @description 获取BIM构建
 */
export function getBimResult(params) {
  return request({
    url: `${commonApiUrl}/bidding-model/list`,
    method: 'get',
    params
  })
}

/**
 * @description 责任分包
 */
 export function getEntryLedger(params) {
  return request({
    url: `${projectApiUrl}/entry-exit-ledger/list`,
    method: 'get',
    params
  })
}

